/**
 * DVN: Distributed Virtual Network Simulation Platform
 * Copyright (c) 2006-2009 Tyson Malchow <tyson.malchow@gmail.com>
 *
 * This file is part of the DVN distributed virtual network simulation
 * program.
 *
 * DVN is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DVN is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DVN.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef _snricall_codes_h
#define _snricall_codes_h
/**
 * int*		    - output/number of IPs assigned
 * in_addr_t**- output/array of assigned IPs
 */
#define SNRICALL_GETIP 1

/**
 * allocates a network socket
 * in_addr_t 	- bind address - 0.0.0.0 for all ips
 * int 			- port_number
 * vci_onrecv_cb_tp - callback for new datagrams
 *
 * int*         - output/socket identifier
 */
#define SNRICALL_DATAGRAM_SOCKET 2

/**
 * sends some network data
 * int			- socket identifier to send from
 * in_addr_t  - destination address
 * int          - destination port
 * unsigned int - data length
 * char * 		- data to send
 */
#define SNRICALL_DATAGRAM_SEND 3

/**
 * logs a string
 * int			- log level
 * unsigned int - length of data
 * char *		- data to log
 */
#define SNRICALL_LOG 4

/**
 * logs a binary message
 * int			- log level
 * unsigned int - length of data
 * char *		- data to log
 */
#define SNRICALL_LOG_BINARY 4

/**
 * closes a socket
 * int			- socket identifier to close
 */
#define SNRICALL_CLOSE 6

/**
 * kills off the current node
 * no arguments
 */
#define SNRICALL_EXIT 7

/**
 * creates a timer
 * unsigned int	- number of milliseconds from now the timer should expire
 * void (*t)(int timerid) - timer callback - function called when timer expires
 *
 * int* 		- output/timer identifier
 */
#define SNRICALL_CREATE_TIMER 8

/**
 * destroys a timer
 * int			- timer id to destroy
 */
#define SNRICALL_DESTROY_TIMER 9

/**
 * returns the system time
 * struct timeval* - output/system time
 */
#define SNRICALL_GETTIME 10

#define SNRICALL_REGISTER_GLOBALS 11


#endif

